package Domo1;

import com.sun.nio.file.ExtendedWatchEventModifier;

public class Student extends Person {
    int no;
    double scoreEn;
    double scoreMath;
    double scoreCh;
    //平均分
    public double aver(){
        return (scoreCh + scoreEn + scoreMath)/3;
    }
    public double max(){
        return Math.max(Math.max(scoreCh,scoreEn),scoreMath);
    }
   public double min(){
        return Math.min(Math.min(scoreMath,scoreCh),scoreEn);
   }

    @Override
    public String toString() {
        return "Student{" +
                "no=" + no +
                ", scoreEn=" + scoreEn +
                ", scoreMath=" + scoreMath +
                ", scoreCh=" + scoreCh +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                ", max="+ max()+
                ",min="+ min()+
                '}';
    }
}
